package fei.zhou.rabbitmq01.business.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hd.center.message.base.message.template.SendTemplate;


/**
 * 描述该类
 *
 * @author <a href="920786312@qq.com">周飞</a>
 * @class: Demo_CMClientGatherAop
 * @date 2021/9/6 19:00
 * @Verson 1.0 -2021/9/6 19:00
 * @see
 */
@Controller
public class Demo_CMClientGatherAop {
    @Autowired
    SendTemplate sendTemplate; // 使用RabbitTemplate,这提供了接收/发送等等方法


    @RequestMapping(value = "getById")
    public Object getById(Long id) {
        if (id == 1) {
            throw new RuntimeException("getById");
        }
        return "OK";
    }
}